package com.face.server.repository;

import com.face.server.entity.Visitor;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Date;
import java.util.List;

public interface VisitorRepository extends MongoRepository<Visitor, String> {

    int countByStudent_IdAndEffectDateLessThanEqualAndEndDateGreaterThanEqual(String id, Date date, Date date2);

    List<Visitor> findByStudent_IdAndEffectDateLessThanEqualAndEndDateGreaterThanEqual(String id, Date date, Date date2);
}
